import 'dart:convert';
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutterapp2/extension/extension.dart';

class TestWidget extends StatefulWidget {
  @override
  _TestWidgetState createState() => _TestWidgetState();
}

class _TestWidgetState extends State<TestWidget> {
  @override
  void initState() {
    super.initState();
    var list = ["哈哈哈", 1111];
    list.forEachIndexed((index, value) {
      print(value.toString());
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("test widget"),
      ),
      body: Row(
        children: <Widget>[
          Column(
            children: <Widget>[
              Row(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[
                  Text(
                    "1102号楼3单元106?",
                    style: TextStyle(
                      fontSize: 16,
                      fontWeight: FontWeight.bold,
                      color: Color(0xFF222222),
                    ),
                  ).expanded(),
                  Text(
                    "审核中?",
                    style: TextStyle(
                      fontSize: 12,
                      color: Color(0xFFFE730F), // todo 根据状态设置颜色
                    ),
                  ).padding(EdgeInsets.only(top: 2)),
                ],
              ) /*.expanded()*/,
            ],
          ).expanded(),
        ],
      ),
    );
  }
}
